<!-- 加载layout.html -->
{{extend('./layout.html')}}
			
{{#block('main')}}	
	<div class="main-container">
		<div class="padding-md">
			<ul class="breadcrumb">
				<li><span class="primary-font"><i class="icon-home"></i></span><a href="index.html"> 主页</a></li>
				<li>学生管理</li>	 
				<li>学生列表</li>
				<li class="pull-right"><a href="#" class="btn btn-danger widget-remove-option delAll" data-name="studentAll">批量删除</a></li>
				<li class="pull-right"><a href="/admin/student/student_add" class="btn btn-primary">添加学生</a></li>
			</ul>
			<div class="row">
				<div class="col-md-5">
					<div class="input-group">
			            <input type="text" name="search" class="form-control">
			            <div class="input-group-btn">
			            	<a href="#" class="btn btn-success no-shadow" style="padding:5px 12px" id="search">搜索</a>
			            </div> <!-- /input-group-btn -->
			        </div> <!-- /input-group -->
				</div><!-- /.col -->
			</div>

			<table class="table table-striped" id="dataTable">
				<thead>
					<tr>
						<th class="text-center">
							<div class="custom-checkbox">
								<input type="checkbox" id="chkAll" class="inbox-check">
								<label for="chkAll"></label>
							</div>
						</th>
						<th>序号</th>
						<th>所在班级</th>
						<th>学生名称</th>
						<th>学生头像</th>
						<th>学生年龄</th>
						<th>学生性别</th>
						<th>联系方式</th>
						<th>入学时间</th>
						<th>学生状态</th>
						<th>操作</th>
						
					</tr>
				</thead>
				<tbody>
					{{#each(stuList)}}
					<tr>
						<td class="text-center">
							<div class="custom-checkbox">
								<input type="checkbox" value="{{this.stu_id}}" id="{{this.stu_id}}" class="inbox-check del-data-check">
								<label for="{{this.stu_id}}"></label>
							</div>
						</td>
						<td>{{(xindex+1)}}</td>
						<td>{{this.class_name}}</td>
						<td>{{this.stu_name}}</td>
						<td class="shead"><img src="/uploads/{{this.stu_img}}"></td>
						<td>{{this.stu_age}}</td>
						<td>{{(this.stu_sex) === 0 ? '男' : '女'}}</td>
						<td>{{this.stu_phone}}</td>
						<td class="stu_time" data-time='{{this.stu_time}}'></td>
						<td>
							<div class="btn-group">
						  		<button type="button" class="btn {{#if(this.stu_status === '在读')}}btn-info{{else}}btn-danger{{/if}} dropdown-toggle" data-toggle="dropdown">
						  			<span id="stuStatus">{{this.stu_status}}</span>
						    		<span class="caret"></span>
						  		</button>
						  		<ul class="dropdown-menu" role="menu">
						    		<li><a href="#" class="btnStatus" data-id="{{this.stu_id}}">在读</a></li>
						    		<li><a href="#" class="btnStatus" data-id="{{this.stu_id}}">休学</a></li>
						    		<li><a href="#" class="btnStatus" data-id="{{this.stu_id}}">开除</a></li>
						    		<li><a href="#" class="btnStatus" data-id="{{this.stu_id}}">毕业</a></li>
						  		</ul>
							</div>
						</td>
						<td>
							<a href="/admin/student/student_edit/{{this.stu_id}}" class="btn btn-success">修改</a>
							<a href="#" class="btn btn-danger widget-remove-option" data-id="{{this.stu_id}}" data-name="student">删除</a>
						</td>
					</tr>
					{{/each}}
				</tbody>
			</table>
			<!--分页-->
			{{include('./page.html')}}
		</div><!-- ./padding-md -->
	</div><!-- /main-container -->
{{/block}}

